package com.zmn.plat.common.dictionary;

import com.google.common.collect.Lists;
import com.zmn.common.dictionary.DictModel;
import com.zmn.plat.common.constant.ProductConsts;

import java.util.ArrayList;
import java.util.List;

/**
 * @author yangshuangping
 * @version v1.0
 * @since 2021-11-19 10:55:29
 **/
public class FaultTypeDict {
    /**
     * 描述: 故障图片类型
     *
     * @return java.util.List<com.zmn.common.dictionary.DictModel>
     * @author yangshuangping
     * @since 2021-11-19 11:01:05
     **/
    public static List<DictModel> listPartType() {
        ArrayList<DictModel> arrayList = Lists.newArrayListWithExpectedSize(3);
        arrayList.add(new DictModel(ProductConsts.FAULT_IMAGE_TYPE_BUILTIN, ProductConsts.FAULT_IMAGE_TYPE_BUILTIN_TEXT));
        arrayList.add(new DictModel(ProductConsts.FAULT_IMAGE_TYPE_OFFLINE, ProductConsts.FAULT_IMAGE_TYPE_OFFLINE_TEXT));
        return arrayList;
    }

    /**
     * 描述: 故障图片类型
     *
     * @author yangshuangping
     * @since 2021-11-19 11:01:05
     */
    public static String getPartTypeCNName(int partType) {
        switch (partType) {
            case ProductConsts.FAULT_IMAGE_TYPE_BUILTIN:
                return ProductConsts.FAULT_IMAGE_TYPE_BUILTIN_TEXT;
            case ProductConsts.FAULT_IMAGE_TYPE_OFFLINE:
                return ProductConsts.FAULT_IMAGE_TYPE_OFFLINE_TEXT;
            default:
                return "";
        }
    }

}
